package xyz.molzhao.alink.service;

import org.springframework.stereotype.Component;
import xyz.molzhao.alink.enums.StorageClientEnum;

import javax.annotation.Resource;

@Component
public class StorageFactory {
    @Resource(name = "aliyunOssService")
    private IStorageService aliyunOssService;

    public IStorageService getStorageService(String type) {
        if (StorageClientEnum.isAliyunOssClient(type)) {
            return aliyunOssService;
        }
        throw new UnsupportedOperationException("404 not found service");
    }
}
